﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using MobileSales.Model.Localization;
using MobileSales.Model.Util;

namespace MobileSales.Model.Products
{
    [DataContract]
    public class ProductImage
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [Display(Name = "Path", ResourceType = typeof(ModelStrings))]
        public string Path { get; set; }
        [DataMember]
        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [Display(Name = "Position", ResourceType = typeof(ModelStrings))]
        [RegularExpression(RegExp.IntegerRegexp, ErrorMessageResourceName = "InvalidInteger", ErrorMessageResourceType = typeof(ValidationStrings))]
        public int Position { get; set; }
    }
}
